package com.example.supermarket.mapper;

import com.example.supermarket.entity.Purchase;
import com.example.supermarket.entity.PurchaseDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PurchaseDetailMapper {
    List<PurchaseDetail> selectAllPurchaseDetail(int Pid);

    List<PurchaseDetail> selectPurchaseDetailByPurchaseDetailNumber(@Param("key") String key, @Param("Pid") int Pid);

    void insertPurchaseDetail(PurchaseDetail purchaseDetail);

    void deletePurchaseDetail(@Param("PDid") int PDid);

    void updatePurchaseDetail(PurchaseDetail purchaseDetail);
}
